<!--
 * @Author: HeAo
 * @Date: 2021-10-08 11:17:47
 * @LastEditTime: 2021-10-08 12:13:25
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \web2103-2105\web2105\3-2-Vue\day01\7-v-on-class.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.13/vue.js"></script>
  <style>
    .active1 {
      color: red;
      font-size: 24px;
    }

    .active2 {
      color: blue;
      font-size: 18px;
    }
  </style>
</head>

<body>
  <div id="app">
    <div :class="{active1:isActive}">标题一</div>
    <div :class="[active1, active2]">标题二</div>
    <div class="active1 active2">标题三</div>
    <div :style="style1">标题三</div>
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        isActive: true,
        active1: 'active1',
        active2: 'active2',
        style1: {
          color: 'orange',
          // 'font-size': '24px',
          fontSize: '24px'
        }
      },
      methods: {},
      created() { }
    })
  </script>
</body>

</html>